package com.app.ui.pager.main;

import android.view.View;
import android.widget.ArrayAdapter;

import com.app.ui.activity.base.BaseActivity;
import com.app.ui.pager.BaseViewPager;
import com.app.ui.view.list.head.ListRefreshCustom;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/9/7.
 */
public class TestListPager extends BaseViewPager {
    public TestListPager(BaseActivity baseActivity) {
        super(baseActivity);
    }

    @Override
    protected View onViewCreated() {
        ListRefreshCustom lv = new ListRefreshCustom(baseActivity);
        lv.setHeadType(1);
        ArrayList<String> list = new ArrayList<>();
        list.add("1");
        list.add("1");
        list.add("1");
        list.add("1");
        list.add("1");
        // 这里ListView的适配器选用ArrayAdapter，ListView中每一项的布局选用系统的simple_list_item_1。
        ArrayAdapter<String> adapter = new ArrayAdapter<>(baseActivity,
                android.R.layout.simple_list_item_1, list);
        lv.setAdapter(adapter);
        return lv;
    }
}
